package com.sat.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sat.goods.model.Sku;
import com.sat.goods.model.Spu;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;


public interface SkuMapper extends BaseMapper<Sku> {
    @Update("update tb_sku set num=num-#{num} where id=#{skuId} and num-#{num} >=0 ")
    int updateInventory(@Param("skuId") String skuId,@Param("num") Integer num);
}


